package com.cebbank.group.demoweb;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.stereotype.Component;

import java.util.Iterator;

/**
 * Created by yl on 2019/9/19
 */
@Component
public class SpringFactoryPostProcessor1 implements BeanFactoryPostProcessor {
    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory configurableListableBeanFactory) throws BeansException {
        System.out.println("BeanFactoryPostProcessor  postProcessBeanFactory");
        Iterator<String> it = configurableListableBeanFactory.getBeanNamesIterator();
        while (it.hasNext()){
            String s = it.next();
            System.out.println(s);
        }
    }
}
